#ifndef ROADLOCATIONLAYOUT_H
#define ROADLOCATIONLAYOUT_H


#include "../../../../../kegui_global.h"

#include <QWidget>

#include <QVBoxLayout>
#include <QWidget>
#include <QPaintEvent>
#include <QFont>
#include <QPointF>
#include <QString>

#include "kesyssetting.h"
#include "mcore/map/MapObject.h"
#include "RoadContext.h"

#include <QLineEdit>
#include <QComboBox>

namespace kepen {
namespace core {


class KEGUI_EXPORT RoadLocationLayout : public QVBoxLayout
{
    Q_OBJECT
public:
    explicit RoadLocationLayout(QWidget *parent, KeSysSetting *conf);
    ~RoadLocationLayout();

public:
    void setSysConfig(KeSysSetting *sysConfig);

public:
    bool eventFilter(QObject *obj, QEvent *event);

private:
    void initDataSource(KeSysSetting *sysConfig);
    void onComboxEditFinshed001();
    void findCrossRoadList(const kepen::kemod::RoadBean* p);

private:
    kepen::core::MapObject *mapSurface;

private Q_SLOTS:
    void timeoutClose();
    void onBtnCloseClicked(bool checked);

    void onRoadIdentifyToggled(int checked);
    void onRoadLocateClicked(bool checked);
    void onRoadCrossLocateClicked(bool checked);

    void onIdentifyScreenHandler(Point2D pointWorld);

    void onActivatedComboBox01(int index);

Q_SIGNALS:
    void onMapLayoutClosed(QLayout *layout);
private:
    KeSysSetting *mSysConfig;
    RoadContext* dataContect;
    QComboBox* m_comBox01;
    QComboBox* m_comBox02;
    QString txtLastInput;

};



}
}
#endif // ROADLOCATIONLAYOUT_H
